#pragma once
#include <iostream>
#include <string>
#include <httplib.h>
#include <pthread.h>
#include <json/json.h>
#include "UrlCodeUtil.h"
using namespace std;
using namespace httplib;
namespace nacos {

	class Nacos
	{
	public:
		Nacos(string ip, int port, string serviceName);
		~Nacos();
		string namespaceId;
		int weight;
		bool enabled;
		bool healthy;
		string metadata;
		string clusterName;
		string groupName;
		bool ephemeral;
		string getServiceName();
		int getPort();
		string getIp();
		Client buildHttpCli();
		Params buildHttpParams();
	private:
		string ip;
		int port;
		string serviceName;
		Params httpParams;
	};
}


